import React from 'react';
import { Chart, Geom, Tooltip, Coord, Legend } from 'bizcharts';

export default class Pieslice extends React.Component {
  render() {
    const data = [
      {
        type: '分类一',
        value: 20,
      },
      {
        type: '分类二',
        value: 18,
      },
      {
        type: '分类三',
        value: 32,
      },
      {
        type: '分类四',
        value: 15,
      },
      {
        type: 'Other',
        value: 15,
      },
    ];
    return (
      <div>
        <Chart data={this.props.data} forceFit height={300} padding={[60, 100, 60, 50]} placeholder>
          <Coord type="theta" innerRadius={0.75} />
          <Legend position="right-center" />
          <Tooltip showTitle={false} />
          <Geom type="intervalStack" position="dbLeTypeCount" color="dbLeTypeName" />
        </Chart>
      </div>
    );
  }
}
